﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;
using System.Timers;

namespace TrapezoidTabs
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void MinimiseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Minimized;
        }

        private void CloseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void MaximiseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Maximized;
            Button MaximiseButton = (Button)sender;
            MaximiseButton.Click -= new RoutedEventHandler(NormaliseWindow_Click); //set it to null from last usage
            MaximiseButton.Content = "o";
            MaximiseButton.Click += new RoutedEventHandler(NormaliseWindow_Click);
        }

        private void NormaliseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Normal;
            Button MaximiseButton = (Button)sender;
            MaximiseButton.Click -= new RoutedEventHandler(NormaliseWindow_Click); //set it to null from last usage
            MaximiseButton.Content = "O";
            MaximiseButton.Click += new RoutedEventHandler(MaximiseWindow_Click);
        }

        private void MenuBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void SearchProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("SEARCH PROJECT");
        }

        private void ViewProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("VIEW PROJECT");
        }

        private void DownloadProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("DOWNLOAD PROJECT");
        }

        private void UploadButton_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.FileName = "Project"; // Default file name
            dlg.DefaultExt = ".txt"; // Default file extension
            dlg.ShowDialog();

        }

        private void UploadStatus_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("UPLOAD PROJECT");

        }

        private void ViewFriend_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("VIEW FRIEND");
        }

        private void DeleteFriend_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("DELETE FRIEND");
        }

        private void MessageFriend_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("MESSAGE FRIEND");
        }

        private void SendChatMessage_Click(object sender, RoutedEventArgs e)
        {
            txtChat.Clear();

        }

        private void SignOut_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("SIGNOUT");
        }

        private void Reboot_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("REBOOT");

        }

        

        
        private void DisplayMessage(string messageBoxText)
    {
        string caption = "FRANKENSTEAM";
        MessageBoxButton button = MessageBoxButton.OKCancel;
        MessageBoxImage icon = MessageBoxImage.Question;
        MessageBox.Show(messageBoxText, caption, button, icon);

    }
    }
}